import request from '@/utils/request';

export function fetchSupplies() {
  return request({
    url: '/api/supplies',
    method: 'get'
  });
}


export function createSupply(supplyData) {
  return request({
    url: '/api/supplies',
    method: 'post',
    data: supplyData
  });
}

export function updateSupply(id, supplyData) {
  return request({
    url: `/api/supplies/${id}`,
    method: 'put',
    data: supplyData
  });
}

export function deleteSupply(id) {
  return request({
    url: `/api/supplies/${id}`,
    method: 'delete'
  });
}